﻿@{
    ViewBag.Title = "Home Page";
}
@model tantrinh.Models.HomeView
<h2>@ViewBag.Message</h2>

<div style="background-color:Gray;width:200px;height:auto;float:left">
<p style="font-family:Tahoma">Đầu đọc</p>
@foreach (var Chitiet in Model.ChiTietDanhMuc)
{
    if (Chitiet.DanhMuc.DanhMucID == 1)
    {
        <ul>
            <li><a href="#">@Chitiet.TenChiTietDanhMuc</a></li>
        </ul>
    }
}
<p>Màn hình</p>
@foreach (var Chitiet in Model.ChiTietDanhMuc)
{
    if (Chitiet.DanhMuc.DanhMucID == 2)
    {
        <ul>
            <li>@Chitiet.TenChiTietDanhMuc</li>
        </ul>
    }
}
<p>Loa</p>
@foreach (var Chitiet in Model.ChiTietDanhMuc)
{
    if (Chitiet.DanhMuc.DanhMucID == 3)
    {
        <ul>
            <li>@Chitiet.TenChiTietDanhMuc</li>
        </ul>
    }
}
<p>Loa siêu trầm</p>
@foreach (var Chitiet in Model.ChiTietDanhMuc)
{
    if (Chitiet.DanhMuc.DanhMucID == 4)
    {
        <ul>
            <li>@Chitiet.TenChiTietDanhMuc</li>
        </ul>
    }
}
<p>Amplifiers</p>
@foreach (var Chitiet in Model.ChiTietDanhMuc)
{
    if (Chitiet.DanhMuc.DanhMucID == 5)
    {
        <ul>
            <li>@Chitiet.TenChiTietDanhMuc</li>
        </ul>
    }
}
<p>Dán film cách nhiệt</p>
@foreach (var Chitiet in Model.ChiTietDanhMuc)
{
    if (Chitiet.DanhMuc.DanhMucID == 6)
    {
        <ul>
            <li>@Chitiet.TenChiTietDanhMuc</li>
        </ul>
    }
}
<p>Cách âm xe chống ồn</p>
@foreach (var Chitiet in Model.ChiTietDanhMuc)
{
    if (Chitiet.DanhMuc.DanhMucID == 7)
    {
        <ul>
            <li>@Chitiet.TenChiTietDanhMuc</li>
        </ul>
    }
}
<p>Phụ kiện khác</p>
@foreach (var Chitiet in Model.ChiTietDanhMuc)
{
    if (Chitiet.DanhMuc.DanhMucID == 8)
    {
        <ul>
            <li>@Chitiet.TenChiTietDanhMuc</li>
        </ul>
    }
}
</div>
<div style="width:700px;background-color:Olive;float:left">
    @foreach (var ite in Model.SanPham)
    {
    <div class="tl_item">
        <div class="tl_item_img">
            <img src="../../Images/Hinhanh/@ite.AnhDaiDien" width="150px"height="150px" alt="" />
        </div>
        <a href="../sanpham/viewdetails/id=@ite.SanPhamID"  >@ite.TenSanPham</a>
    </div>
        }
</div>